Added branch-changed detection