bug in error handler.