Fix some bugs in users models