Added trim() call to work around mystery bug where whitespace gets appended to single...