Fixed json_encoding multiple times of environments