fixed bug in cython wrapper