fix 64 bit problems