fixed minor bugs in autocomplete selector