fixed the json stuff saving