fixes for empty db