Added autoscroll
Fixed bug with selected index