Js error fix on cancel (#99)