Don't make window visible at launch (we will launch it when appropriate).
Check that there's a modalSession present before attempting to end modal session.