Fixed cs_port selection bug in DeviceForm