fixed a bug in mtplot