Fixed issues with server script.