changed gui.exit() to stop()
fix insert