fixes to state machine will loops.