Corrected a check for attributeNames in generation. The API changed to take fields instead
Corrected an bug where when no fields were provided, no attributes were added