Modified server code
Fixed server code