Added Reset of exitFunc