Fixed some logic in the "is the db updated" method.