fixes listener leak bug