Changed $object_type->object_type to $object_type->class for clarity.