Fixed comparing to boolean problem