fixed edit and delete operation