Fixes for various branch-related errors.