exiting script issue