Bug fixes in user module.