bug fix handle_serial_data