Fixed a bug caused from tornado upgrade