fix bugs due to buffer index change in lastest vim