Bug fix : Duplicate check messed up.