bugfix-segfault with high r