Change toUserid to toId in custom tournament code.