fix z is always zero