Fixed bug in switching tabs??? Maybe??