fix a few bugs in the server, pathnames are fun