some bugfixes related to tabs removal