several fixes to swig/python wrappers