Fixed some bugs in wordcache