fix bug with getting ami name