Removes some extra spaces caused by removing \n and \r