Fixed auto-completion bug