fixing problems with python interface