Debug: Typo of clearAll and Declaration of flags