Small fix to critical view proofing Javascript