Fixing issue at closing the wizard