fix duplicate number issue