Fixed bug found by Cython.