Fix bug that prevented insertion of the last word.