Fix for tornado 4.0