fixed some more busted tests
fixed gen-testcases to handle 64-bit cases properly