fix: moved window setting to top to supress window change in startup