repaired some mistakes