Fixed typo in prepareJSON in index.php