trimming whitespace bug fixed