fix in createNewEntity()