Fixed brain fart in the statemachine