Add prompt for duplicate number, and some bug fixed.