fixed error in returning uid