Counterskills don't do damage until enemy has had first turn

Hi there, I'm new to Rpg Maker VX Ace and scripting, so I'm needing some help.

I'm using YSA's Classical ATB as my battle system along with Fomar's Counterskill attacks. They play nice with the exception of one thing: if I attack an eneny before it's had its first turn, its counter attack won't do any damage (NULL and FAILED pop up). Interestingly, healing skills work just fine.

I think it might have something to do with "item_apply", maybe I need new code somewhere in here for the damage to be applied before the enemy's had its chance to do its first turn. That or the enemy hasn't been initialized yet so the game is just giving NULL values.

Any guidance would be appreciated

Original thread: https://forums.rpgmakerweb.com/threads/counterskills-dont-do-damage-until-enemy-has-had-first-turn.22409/