undo testing bit
Fix boolean logic error