js syntax in autocomplete fix