fix sh function invocations