Save context bug fix