fixed post-autocompletion bug (take 2)