Fix incorrect object to check