Fixed db crash problem when it is first time launching