fixed some javascript errors being thrown in tournaments