Fix outdated context manager.
Merge pull request #114 from astaric/fix-setting-handler

Fix outdated context manager.