fixing json dumping