fixed saving in main context