duplicate checking condition bug fixed