fix a number of assuptions that a long could hold an inum