Fixed db initialization