fix missing throw for err()