Fix function binding