fix index type bug