fix removing listeners on quit