fix bug in random word selection