Fix encoding for bool err types