manual merge of: #453. Kudos to @ab268 (I added uid just to the names to make them unique)