a few cleanup in uart