fix: render template according to request format