Fixed problem with user ID regenerating.

Fixed problem with user ID regenerating.
Merge pull request #165 from mafiglio/bug_164

Fixed problem with user ID regenerating.