Fixed calling of autocomplete JavaScript