Some minor bug patch for auto-completion.