fix rewriting changement bug