Error calculation lib: fixes due to SortLib changes