fixed database error on startup