fix: getWord logic