fix placement of end