fixing type error that caused wrong calc on 64-bit