context fixes on error conditions