Fixed the whitespace issue by adding a string to represent whitespace. Have not tested yet.