fixed an issue where listeners were added instead of removed