Fixed not checking equality