get rid of a warning message by setting up the main window properties before showing it