fixed problem #4 for 64-bit ints