[BUGFIX] Editing all records after deleting one throws exception