Fix end in wrong place