Fixed index error in GetBaseFunc