Fixing 'Type mismatch' exception in destroy in IE11
Merge pull request #2580 from Phazeshift/master

Fixing 'Type mismatch' exception in destroy in IE11