Modifications to make this work on the amazon instances