server and some fixess