fixed replace order