fix spaces before EOF