Fix 'Can use advanced search'

Now 'Can use advanced search' permission work correctly.