Fix potential reference after dispose.