correct a bug in error overlapping