swig patches for director