add the ability to close channel windows, fix closing of queries