fixed edit bugs