fix cases when the Zhao et al. code fails