fixed rebuilding index