Fixed bug db creation fail when it does not exists