fixes for some invalid fields for query