fix a few bugs about switching cscope and gtags