Merge pull request #1251 from hwhw/master

fix usage of old refresh API
close file descriptor of dictionary lookup pipe