Fix object class assertion bug