Fix select and deselect methods for particular tab