fixed remove listeners by function bug