Changed the way tab ID is found.