Improving character's state machine transitions.