swig script with fixes