Handling multiple targets using the tab switch