Fixes for 32-bit mode