Fix bug around initial value in fold