Changed entity to object manager