Fix EC2 connection not filtering properly