improved select_ugid test