some minor changes with entity.