app: fix race between input done and judgeResult