fixed bug issues with json loading