Fix error in userId handling