fixed trailing whitespace bug