fixed a bug with selecting first item