Avoid script error in autocompletes