Renamed switch_branch to checkout_branch and fixed checkout bug.