rotten API
#22 bug when closing all tabs