fix corner case bug in server_ctx