minor fix when task=finished in stat