Fix ending issue.