Very small fix to reset context function