fix Wrong values in datamodel under edit mode

This pull request fixes the the way the suggestions are added when in edit mode. When the suggestion is in edit mode and user selects a new suggestion, it is added at the index of edited suggestion.