Fix issue with undefined fields_string variable, trim whitespace
Merge pull request #6 from Coplex/master

Better late than never, right?