Fixed error with function call