Fixes issue with serialport data events not being emitted.