Updated State Machine, Timeout fix