Context and mode fixes.