bugfix: segmentation fault in Python 2.7 because of NULL pointer