Fixed search for 'all' taking too much memory