fix mex endpoint