fix issue with new user model format (thanks to @nfollin)