Modified Reduce to not mess up the stack if an application throws an exception

Signed-off-by: Martin Evans <martindevans@gmail.com>