fixes for db init