fix bug in req-length