Fixed I/O number bug due to not properly copying the device definition.