Running common event when state runs out

Hi there,
I am trying to have a common event run once a certain state is either removed or runs out.
I am using Yanflys Buff and State core for the custom remove/leave effect notetag but the way I set it up doesnt work.
Since I dont know javacript I have no clue what is wrong.

<Custom Remove Effect>
$gameTemp.reserveCommonEvent(15);
</Custom Remove Effect<

<Custom Leave Effect>
$gameTemp.reserveCommonEvent(15);
</Custom Leave Effect>

This is how i set it up.
Can someone help me?
Me being the silly sheep that I am found the error and found a better solution!
This can be closed!

Original thread: https://forums.rpgmakerweb.com/threads/running-common-event-when-state-runs-out.88467/