fixed db init functionality to not rely on already created indices