Fix: Exit on function isSameBranch before return top dir.