fix bug with z