Additional fix for #709

In extended testing the previous fix for 709 was not robust enough and while it would work for some length number strings it did not work for all, this code fixes that.