fix cd so it works with z