make disable of advanced-search-link a bit more reliable