on tab change, change work selection

based on tab showing
clean up