Bugfixing for JSON