fix(config): set config prior to returning the closure
Merge pull request #1 from jrschumacher/fix-set-config-prior

fix(config): set config prior to returning the closure