Fixing Collection reduce (fix EOF)