fix the undefined "server" error