Fixed the bugs with calling specific functions in a program