fixed error in boolean expression