Fixed errors handling regression that occured after merge