Fix the problem when type-A fix horrible generate filled areas due to flipping of line order.