add support for half-full uart buffer int