Fixed some JSON bugs.