fix word length bug