fix doesn't cleaning foreign keys