receiving ack and nak on client and fixed off by one error on server