Fix function creating with bogus expression, show errors