Adding layout check for search