Fix for initial window visibility.