fix usermodel and tests