Fixed bug in user model