prevents seg fault in cython