make sure no unescaped grep is used, fix #3107