fix #62 fix should not be able to open prefs multiple times