Fixing 'end'