fix listener shutdown