Fixed payload-length error. Changed up checking of return parameters.