Fix ag and grep invocation