Prevent activities from being added multiple times when on edit or browser back/reload.