fix python2 bindings