main windows now loading with restored state