Errorhandler with bugs.