fix few bug in pytho ninterface