Fixing code to show advance search