Study.as_json: fix bug