Fixing error handler.