auto discard and bug of last tasks fixed