fixed segfaults on certain seeds