fix bug in json file loading, see issue #8