remove flagged from tasks and add status shown in flagged page