fix to render json requests properly