Fix to make 32bit and 64bit portability