fix 64-bit issues