fixed error in conditional in if statement