fix incorrect next_ndx when we remove a backend