make sure only one window will be open