Fix ami fetching