fix cascade deletion problem