Fixed bug on 64-bit machines