fix error in active learning algorithm