added dependent destory to tasks and memberships.