fixing add/edit on backend