Word length check bug fix