stackoverflow bug fixed when testSet is too small