next value bug