Issue with Add button during edit action

at edit action i saw some problems with add button.
if we have some items in nested form and we want to add new items to our nested form, new added item index will be 0 and it overrides previously added items in the database.