fix for tornado error handler