fixes nested steals and adds global_amd