fix effects segfaulting on destruction