fix status codes in the render() function