Fixed bug when double clicking tabs