prevent closing of all tabs keeping the last one