allow-recursion instead of allow allow-query-cache and fix condition