make option vars global
Merge pull request #159 from Xuyuanp/master

make option vars global