fixed context warning for error handlers