Fixes bad context references.