Correct some dirty string manipulation.