Fixing minur bugs for uart