Fixes for handling dynamic fields from queries