corrected error in the permutation of BADs