fix bug in tournament script