fix error message when getting branches