Fix function defs