bugs in render_json with preprocessing fixed