States not breaking on turn. (Yanfly Freeturn problem?)

I've tried solving this myself for several months now. I usually get fed up and confused. I decided to finally ask for help, since I couldn't find the answer on my own.

I have a state setup called "Frozen" that suspends the target and makes it so they can't attack. The state has a chance of breaking with damage.

However, there's a game-breaking bug currently in place, where as when the state is "broken" the monster's turn is still forfeit, as if it's still "frozen." Meaning, you could "freeze" a monster indefinitely and it would never be able to fight back.

My problem is I'd like the enemy to be able to fight back and take it's turn if the state is removed / broken.

I believe this works normally with the regular battle system. Not so much with Yanfly's Freeturn Battle System.

I have it set for each character to take their turn in any order. The monsters don't get a chance to attack until all party members have taken their turn, so I'm not sure if this is relevant. Still though, the monster just sits there, even if still "frozen."

Is there a solution to this? I can create a video or answer more questions if this isn't clear enough.

I also may be overlooking something in normal Database functions... but I've tried them all.

Any help would be appreciated. Thanks!
The problem, I believe, is caused because enemy actions are determined once at the beginning of a round and never recalculated. The solution I've used in the past is to redetermine their moves before every action.

Code:
  #--------------------------------------------------------------------------  # new method: end_ftb_action  #--------------------------------------------------------------------------  def end_ftb_action    if $game_party.inputable?      select_next_member    else      status_redraw_target(BattleManager.actor)      BattleManager.next_command      $game_troop.make_actions # new line      turn_start    end  end
I'm mostly just going from memory though. I think this is all I had to do to fix it, but I've made so many tweaks to the system that I might be forgetting something.
I thought I replied to this earlier this morning... weird.

Anyway, it seems like you're on the right track, but the code you gave didn't do the trick. I tried putting it everywhere including directly after FTB, no luck. If anyone could provide further assistance, I'd appreciate it!
Ah, sorry. For some reason I just posted the method this morning and not the class. I guess I was thinking you'd just edit it for some reason? Try it again actually in the class, because just pasted in the editor, the above will do nothing. And yes, it needs to go after FTB.

Code:
class Scene_Battle < Scene_Base  #--------------------------------------------------------------------------  # new method: end_ftb_action  #--------------------------------------------------------------------------  def end_ftb_action    if $game_party.inputable?      select_next_member    else      status_redraw_target(BattleManager.actor)      BattleManager.next_command      $game_troop.make_actions # new line      turn_start    end  endend
I should have noticed it was missing too. I've been away from this stuff for 5 months now or so, so it didn't click. 

That worked perfectly. Thank you very much for your help!

Original thread: https://forums.rpgmakerweb.com/threads/states-not-breaking-on-turn-yanfly-freeturn-problem.36569/