refactor the completer-changing (fixed the issue with the auto
completion)