Fix bug with selectTab logic

Rearanged the arguments of selectTab so that the event is no longer
required