fixed a bunch of incorrect portings to the newer bindings