Fix function parsing