Fixed boolean expression in if-statement