Fixed bug in do_mstat