Quick fix for incorrect handling of duplicate values.