Fix internal python bindings