Added finished flag for tasks