diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c
index 48e1ed28b..facee3ad1 100644
--- a/src/battle_script_commands.c
+++ b/src/battle_script_commands.c
@@ -9786,7 +9786,7 @@ static void Cmd_handleballthrow(void)
 
         
         #ifdef POKEMON_EXPANSION
-        if (IS_ULTRA_BEAST(gBattleMons[gBattlerTarget].species))
+        if (gBaseStats[gBattleMons[gBattlerTarget].species].flags & F_ULTRA_BEAST)
         {
             if (gLastUsedItem == ITEM_BEAST_BALL)
                 ballMultiplier = 50;