fix a bug on 32 bit machines introduced in last commit