Fixed several more bugs that confused IAM ids with names