fixed bug in uid validation