Fix multiple id issue in edit mode