Better listener closing