Fixed UART read code