Fix for tornado 3.x