Errorhandling and bordermapping