Corrected some server codes