fixed renderError method bug