fixed replica.php