Appends the missing `end`.