gui: fix crash after "open device"