Fix check DB is empty (Previous Lines 72-84)