Bug fix for the duplicate function.