bug fixes and server/client net code