Some fixes in autocomplete autotriggering