fix mex snap