fix production error handler