Yanfly Action Sequence skip frames.

I've been trying to figure out this problem for a few days now but i cant get it to work.
The problem is that the first time a skill is used, the animation skips 5 frames.
The second time the skill is used it works perfectly.

plugins that i use
http://yanfly.moe/2015/10/10/yep-3-battle-engine-core/
http://yanfly.moe/2015/10/11/yep-4-action-sequence-pack-1/
http://yanfly.moe/2015/10/12/yep-5-action-sequence-pack-2/
http://yanfly.moe/2015/10/12/yep-6-action-sequence-pack-3/

The sequence that i use (i have tried so many different but all with the same result)

<setup action>
display action
immortal: targets, true
</setup action>

<target action>
if user.attackMotion() !== 'missle'
move user: targets, front, 20
else
perform start
end

wait for movement #putting a wait command here also gives the same result.
motion attack: user #putting a wait command here also gives the same result.
action animation: target #putting a wait command here also gives the same result.
action effect
</target action>

<finish action>
clear battle log
face user: home
perform finish
immortal: target, false
wait: 20
</finish action>

The same problem occurs with every single skill.


Also, maybe related or maybe i need a new thread for this. I happen to have a lot of lag while using these plugins. ( when in battle) The lag spikes are also gone the second time a skill or attack is used. The only lag that remains is right after the damage numbers show up when i attack the enemy ( not the other way around )

If anyone has an idea how to fix this issue then I'm a very happy person.

( As for the plugin order, i followed the list on yanfly's site)



EDIT:

Well, i should have made this post 3 days ago because now it all magicly works perfect.
I tried to re-create the problem by turning all the plugins on one by one.
the only thing i noticed that might help some others is that once i had the battle-engine + sequence 1,2,3 AND the autopassive states + passive aura turned on. I got huge lag spikes everytime i recieved damage. By turning either one of those plugins "off" made it work good again.

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-action-sequence-skip-frames.95679/