Help fixing a bug in Galv's character animation script VXACE [Solved]

Update: I figured it out!

In line 80, your have:
@idletime += 1 if !$game_map.interpreter.running?
Turn this into: @idletime += 1

It all seems to work fine now. No idea why, but it does. Fingers crossed that this will continue to work. 😂

Hello everyone,
I found a small bug in Galv's character animation script for VXACE, and I can't seem to fix it.
With this script, you can set different animations between Idle, walking, and running. The script will automatically toggle between these animations. The bug that I'm struggling with: is that when I am running or walking with my character and interact with an event (Action trigger, Player Touch, or sometimes parallel process), the sprite doesn’t go back to the idle sprite.

Basically, every time I activate an event in this manner (most noticeable with Player's Touch), the character gets stuck in the walking (or running) animation for the duration of the event.
It's easy to test by creating an event on the map, set it to ‘player touch’ for activation, and let it display text. Then when I walk over the event, the character kept repeating the walk cycle while the text appeared on the screen.

Can anyone help me fix this?

Galv's script:
https://galvs-scripts.com/galvs-character-animations/

Original thread: https://forums.rpgmakerweb.com/threads/help-fixing-a-bug-in-galvs-character-animation-script-vxace-solved.140178/