Fixed several errors in Cython due to booleans