Fix incorrect 'end' placement.