Some fixes in autocomplete autotriggering
Merge branch 'refactoring'