made advanced search work slightly better