Fix incorrect key names in $branch array