Config variable missing from function closure

The default settings are used as appConfig is not populated with anything.
Revert "Config variable missing from function closure"

This reverts commit d348f3c6857af5ed8ddb3ade2c13d7bd3f679e89.