Fixed code to work with new config structure.