fix bug in generating cand_swap