Bug fixes

Forgot to select database and an unbalanced paren on the config table
create query.