Fix write order issue with SF/CF