fix jslint mix tab and space warnings, fix a bug when report progress, the lastFlag should be reset on each loop start