Fixing typo on db checking