fixed edit race bug