fix hang on preference dialog box
Merge pull request #999 from ZappoMan/master

fix hang on preference dialog box