fix checking of object condition