Fixed crashes in 32bit mode (with optimizations on). No idea why they occurred.