updated all_errors logic