Moved callback function for selectItem

so it gets called before renderItem