fixed word checking at end