fixed crashing animaiton bug
state machine for routing