fix bugs of auto complete plugin