fixed edit/delete bug