Bug in player sprite

I cannot find the error I am doing:
In a minigame a sobstitute the character graphic with different cursor. The game logic is right, I checked an the variables have always the expected values.
Spoiler: code
Untitled.png
The big if first part selects the right cursor and BY ITSELF it works (without the second part).
The second "if" changes the color of the cursors by changing the player orientation, but when placed below the first one nothing works anymore, the cursor remains always in the default shape (liq cursor 0, that doesn't have different colors)
I hope I've been clear enough, someone can help me?
Of course as soon as I posted this it magically started working without me touching anything...
Sorry everybody

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/bug-in-player-sprite.121318/