Fixing zero length total found bug