Fix various amd issues