fixed bug in user_id formulation