fixed remove_effect segfault