Advanced search now works with intended functionality