fix server address generator function