remove unused code for Release build
fix 32-bit build