Value order bug fix