credit Derrik with 64-bit changes