branch errors rectified