add re-index and fix bugs