Added some conditions in the controller, so that it doesn't set a state
if it's already the same (to avoid the reset of the sprite ...)