Fixed some server code