fixed db loading