Fix issue with undefined fields_string variable, trim whitespace