Fixing "Not an entity"2