Memory leak fix:

https://wpf.codeplex.com/discussions/216609