small fixes to edit functionality