chacking flags, bool mand was not reset after set once to true