Added serialization to the script response