Made getting UIDs of a key more robust. Not all keys have email associated