Fixed EC2 bug

Fixed bug #18