fix word_select bugs