Made small changes to make sure this works on the AMI