Handle 0 previous values correctly