small server code refinement