Changed assert to a more stable testing criteria.