Problem with Jet's Viewed Battle System and reflecting attacks

I've been using this script for a year or so and this is the first time this happens to me. So, when an enemy reflects itself and a character attacks them and the character receives the damage, if the the character dies because of that, the game crashes, showing this error. Also, if the attacks hits more than once, but the character dies with the first reflected hit, the remaining attacks still hit the enemy, when they shouldn't because the character is dead.
Anybody knows how to fix this? Thanks in advance.
This is the script:
Screenshot_1.png
Try this, probably
Code:
if (@subject.actor? || @subject.bat_sprite?) && @subject.current_action && [email protected]_action.guard?
It worked!! Thank you very much TheoAllen!!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/problem-with-jets-viewed-battle-system-and-reflecting-attacks.121094/