Fixed bugs which occurred on 32-bit systems