Fix KeyError occurring if user was not set.