Resolved redirect loop in the event that the database is empty.