Avoid refreshing terminal if the index is same