Fix a bug in error collecting algorithm.