Fixed bug when getting parent functions