fixed problem with setting an entity's name to null