fix refreshing index