fix code swig ext