Fix function completion bug.