fix some bugs in Request class