Finally fixed db