Fixed issue on first run when no database