reducer fix for zero length input