Fix a bug that affected older pyserial versions