clear aindex_stack every time