Fix function call type checking