Corrected error in funciton call