Added missing error handler restore