fixed sql config setting reading

This is a bit of a monkey patch, but the correct way to access config objects seems to be through methods like the one below. 

I chose not to rewrite the whole thing though and if you don't like it, just do something like 
sql_enabled = cfg['sql']['sql_enabled'] in ['true', 'True']