fixing uid generation