try to fix core dump that happens while spidering.