Admin Mode Not Fully Working

I just looked over the code and found that the file only close after "Admin Mode". I made it so the file opened in "Admin Mode" and it works perfectly. No more restarting. Thanks again for all your help.