fix some edit bugs