amt: fix gateway mode stuck