bug fixes with ec2 auto scaling