fixed storing of json data