fix bugs on contest closing