Fix branch build errors and warnings on some machines