fix bug in _branch() method where value is not passed recursively