Forwardported some typo fixes I noticed during backwardporting from 1.6.4. Properly cleaned imports this time.