Fixed bug with JSON files