Fixed redundant removal of trailing spaces