fix leaking listeners