fixed delayed program exit
added rtf support
added windows preview support