Added correct handling for unduplicate and clear-buttons