Fixed dumb bug from misuse of reduce