fixing configs and db access