fix state machine edge cases in main room