Hopefully fixed issue where longer swings would cause the state machine to go to an improper state