improved speed of toplevel completion + bugfix