wrong variable $property in if statement