Shouldn't that be `and corr_last < count`?