server code fix