Fixed various obscure reduce bugs
THIS NEEDS A MAJOR REWRITE!!!!