fixed error in UCB calculation