fixed error when cutting a line on index 1