fixed possible crash on selecting RANDOM