Fix function session