fix minor bugs in auto-import for autocompletions