Better support of error of errors and add tests