Revert "Another correction for get_next_value function"

This reverts commit 6d9ef375e4956af49db566fbe08299220c13ee48.