Fix $config{UID} being set incorrectly

Fixes issue #697 reported by @Nowaker