Fix entity creation.