making it stop when you change tabss