fixed db initiation