Small bugfixes in freduce pass