Fixed: Wrong check for valid result before invoking an 'each' callback.