Window position not set correctly on startup