Minor fix in end a pattern