Like Cong, I would have wanted a detailed commit log message explaining
the exact bug and why you fixed it the way you did.
It seems like Cong's patch deals with it in a different way but needs
a more formal submission so I'll mark all of this superceded.