fixed bug where strings were not trimmed