Implemented synchronous loading of json files which fixes very strange bug