fixed unterminated function in server