boolean value comparison corrected