Selected index fix