Fixed bug with db init