Improve uid control