If you have a rod's gui up and you click on the x in the corner of the gui instead of pressing e or walking away, you get an error and it returns to the main menu.
Error while running event control-your-rods::on_gui_click (ID 1)
LuaGuiElement API call when LuaGuiElement was invalid.
stack traceback:
[C]: in function 'index'
__control-your-rods/scripts/formula-explorer.lua:224: in function 'player_clicked_gui'
control-your-rods/control.lua:207: in function <control-your-rods/control.lua:202>