fix splice to find the correct end after the starting location