Resetting the serial connection on emergency stop