fixing dx/dz passing