fix bug of forgetting to pass request to render