fix bug for return to  index