Fix the scope error when deregistering listeners while destroying drawing manager