Fixed json generation