Fix for new error handling code (scope not bound)