use removeObserver instead of my hack