fix 64bit portability

a simple fix for 64bit compatibility