Fix issue with stop/restart in modes_gui.