fix a variable name error and content length error.