fix initial db data and uninit variable