Fixed a bug in pop_index()