fix bug: this was introduced when branches were switched and data was
discarded, which I've never seen before