fixed userId not being set bug