Fixed bug with build_index that forced retrieval every time.