Fixed error when trying to remove event listener on graph destroy.