Minor tweeks to get ami sub-command working