Error handling for if the window isn't open yet.