Fix preferences window showing as invisible on fresh installs