made some minor fixes to make stuff work in client and server