I think it is worth adding test coverage for these lines (322-331).