Fixed combine_errors function