Fixed issue with non-array entities.