Added changes to prevent duplicates