Fix function calling