(MESS) fixed a few errors caught by VS. nw.