Fix for possible exception
Unable to cast object of type 'System.Windows.Documents.Run' to type 'System.Windows.UIElement'.
thx to rdingwall (Richard Dingwall) https://github.com/rdingwall