bug fix in update z range manually