fixed some more compile bugs (including Python bindings)