Merge pull request #2 from yangshuxin/lgcpath

Misc bug fix and enhancement