fix bugs in chance