fix typo that leads to segfault
fixes #84