Fixes for fold/reduce.