Changed location of script to exit the frame