fixed the delete empty sessions logic