Fixed bug caused by harvester performance improvement.

Also fix findbugs violations.