prevent window from closing until choice is registered