Fix stack overflow in ServerManager