Update gate.php