fix variable error in teamreg