Fix option caching issues

fix #123
fix #125