changed default for saving indices
fixed multiple bugs in JSON output