Fix branch api