Fixes a bug in the User model