Changed Task.Run to Dispatcher.InvokeAsync; seems to work pretty well