fix get active index