Closing last tab kills application. Fixes bug #229