fix some stuff with server logic