fixed 64 bit issues