Fixed problem with NULL errors when saving contexts.