Fixed error in function call