Fixed bug in 32bit environment