Moved the IE memory leak fix to after it has cancelled events