Fix random crashes on 32-bit. Thank you Valgrind