Added lines to optimise mttedx.