Several fixes for the EC2 driver

Several fixes for the EC2 driver.