fixed a possible overflow at compile time for 32bit systems