fixing reduce/reduce errors