I'm having a problem when connecting the device; the program detects the connection but then closes itself automatically.