Removed the debug print and use &= for bool