Fixed two bugs in user creation.