set UID before use, or it will be null
Merge pull request #97 from detecti1/master