fix bug that occurred when outputting pattern 8191