serial port handling fix (win32)