Fix DB up to date detection