Fixed search engine

Now it correctly detects pages