fix get device script