Fixing error with JSON