fix JSON parsing on reload