Fixes for x64 and hacks for D bugs / weak spots