fixes add/edit in controllers