fixed db stuffs