fixed so that it properly gets default device if no -i is given