Fix issue with context not saving
Fixes #158