crash when opening a first tab after closing all tabs, closes #39