fix bug with OptionPane.apply result exceeding the number of predefined values