Fix wrong average word length implementation