Run preview dialog on UI thread (fixes #32)