Fixed giving of Ids of entity.