Fixed issues involving JSON