Fix EC2 connection bug