Fix function invoke on object