Fixed a bug where flags were not reset after restarting the game