Small fix for determine of valid history rows.