Improved handling of strings with spaces.