small fixes for CPython