Fixed some issues when creating a request.