Fix object exists in version check query