User query was picking up wrong copy of userid.