fix a bug with MT