Fix to ensure that completed tasks are marked as complete