Fix bug in running judge_machine