fix corner case when z cannot be estimated