fix error from tornado upgrade 4.0