fixed spurious segfaults *blush*