setting selected index to top of list when it exists