Fixed some state transition issues