fixed remove_effect segfault, added a debug item