fixed bug with 32 bit systems