minor fixes to js autocomplete