Fixed error using GenericEntity