Fix function types