fix handling of nil uid and remove unneeded rescue