Correcting two different kinds of extra whitespace