Fixed problems to initialize the db