Fixed unsigned integer underflow problem. Achieved required and B functionality