Slight improvement to UART implementation.