fixed JOptionPane bug