fixed UI and indexing bugs