fix 32bit errors