Fix wrong index when getting function info.