Fix jsonconfig get unavailable name
Make database config is optional