fix adding and erasing terminal tabs