fixed resetSearchword function