x64 ESM fixes