Some minor fixes to context