python interface fixes