updates for compatibility with tornado 3.1