Applied Neil W Rickert <rickert+nmh@cs.niu.edu>'s msh.c patch: