Fix error on select index